<div id="content">
    <div id="title_content">Bộ sưu tập</div>
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
        <form method="POST" action="<?php echo site_url('admin_media/delete_multi_category') ?>" onsubmit="return go();">
            <table class="list" width="100%">
                <thead>
                    <tr>
                        
                        <th>Tên bộ sưu tập</th>
                        <th>Số lượng albums</th>
                        <th>Xem album trong bộ sưu tập</th>
                        <th colspan="3">Action</th>
                    </tr>
                </thead>
                <tbody>
                <?php foreach ($category as $aRow): ?>
                    <tr>
                       
                        <td><?php echo $aRow['name']; ?></td>
                        <td width="250px"><?php echo count_album_of_category($aRow['id']); ?></td>
                        <?php if(count_album_of_category($aRow['id'])>0 ){?>
                        <td width="200px"><a href="<?php echo site_url('admin_media/list_album_by_category').'/'.$aRow['id']; ?>" >Xem</a></td>
                        <?php }else{?>
                        <td width="200px">Chưa có album</td>
                        <?php } ?>
                        <td width="30px"><a href="<?php echo site_url('admin_media/edit_category/' . $aRow['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/modifier.png" alt="modifier"/></a></td>
                       
                        <td width="30px"><a class="confirm_delete" href="<?php echo site_url('admin_media/delete_category/' . $aRow['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>
                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
           
        <!--END delete_button-->
    </form>
</div>
<!--END content-->
